package com.itfreer.bpm.power.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.itfreer.bpm.power.dao.IBpmRoleDao;
import com.itfreer.bpm.power.entity.BpmRoleEntity;
@Component("BpmRoleBaseService")
public class BpmRoleBaseService implements IBpmRoleService {
	
	@SuppressWarnings("rawtypes")
	@Autowired
	IBpmRoleDao dao;
	protected IBpmRoleDao getDao() {
		// TODO Auto-generated method stub
		return dao;
	}
	
	/**
	 * 获取实体
	 * @param guid			唯一值
	 * @return
	 */
	@Override
	public BpmRoleEntity getEntity(String guid){
		BpmRoleEntity entity = getDao().getEntity(guid);
		return entity;
	}

	@Override
	public List<BpmRoleEntity> getEntitys(String queryFields, Map<String, Object> where, Map<String, Integer> order,
			Integer pageSize, Integer pageIndex) {
		List<BpmRoleEntity> resultList = getDao().getEntitys(queryFields, where, order, pageSize, pageIndex);
		return resultList;
	}
	/**
	 * 获取当前条件下的数据行总数
	 * @param where			查询条件
	 * @return
	 */
	@Override
	public Long getRowCounts(Map<String, Object> where) {
		return getDao().getRowCounts(where);
	}

}
